package com.hsgene.order.condition;

import com.hsgene.common.util.support.OrderField;

import java.util.stream.Stream;

/**
 * 退款排序条件
 *
 * @author wangbing
 * @version 1.0, 2018/11/13
 */
public enum RefundOrderField implements OrderField {

    /**
     * 排序参数
     */
    CREATE_DATE_TIME("createDateTime");

    private final String value;

    RefundOrderField(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static RefundOrderField getInstance() {
        return values()[0];
    }

    @Override
    public Stream<String> getNames() {
        return Stream.of(values()).map(RefundOrderField::getValue);
    }

    @Override
    public boolean check(String fieldName) {
        return OrderField.check(this, fieldName);
    }
}
